# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=openhmd
pkgver=0.3.0
pkgrel=1
pkgdesc="Free and Open Source API and drivers for immersive (VR) technology"
url="http://www.openhmd.net/"
arch="all"
license="BSL-1.0"
makedepends="meson hidapi-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenHMD/$pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir/OpenHMD-$pkgver"
options="!check" # https://github.com/OpenHMD/OpenHMD/issues/248

build() {
	meson \
		--prefix=/usr \
		--libdir=/usr/lib \
		--buildtype=plain \
		-Dexamples='' \
		. build
	ninja -C build
}

check() {
	ninja -C build test
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
}

sha512sums="20e6490287295f3de08150f1b036a821b97443a303ee404c71981f57f4ef291b50b6b83acd2dbb5e86a827c40b3fd06d790dabe4de3b0075432111d67875e7d2  openhmd-0.3.0.tar.gz"
